
<div class="popup " >
    <table border=0 class="tbl-popup1">
        <tr>
            <td>フィルタ</td>
            <td colspan="2">
                <input id="filter" name="filter" type="text" style="width: 270px;"/>
            </td>
            
            <td style="width: 10%;"><input id="search_ocba" type="button" value="検索"/></td>
            <td style="width: 10%;"><input id="clear" type="button" value="クリア"/></td>
            <td class="f-right"></td>
        </tr>
    </table>
    <div style="max-height: 200px; overflow: auto;">
   <table class="adminlist" >
		<thead>
			<tr>
				<th width="15%" class="left">
					コード 			
                </th>
                <th width="40%" class="left">
                    名称 
                </th>
				<th width="45%" class="left">
                    名称カナ				
                </th>
				
			</tr>
		</thead>
        <tfoot>

		</tfoot>
		
		<tbody id="search_result" style="position: relative;">
      
		</tbody>
                
       
	</table>
    <?php $type = JRequest::getVar('type');?>
    <input type="hidden" id="ocba_type" value="<?php echo $type?>"/>
  </div>
</div>
<script>
jq(document).ready(function(){
    //initial result
    jq('#search_result').load('index.php?option=com_popupstatistic&task=search_ocba&filter='+encodeURI(jq('#filter').val())+'&tmpl=component&type='+jq('#ocba_type').val());
    
    //search ajax call event
    jq('#search_ocba').click(function(){
        //alert('search');
        jq('#search_result').load('index.php?option=com_popupstatistic&task=search_ocba&filter='+encodeURI(jq('#filter').val())+'&tmpl=component&type='+jq('#ocba_type').val());
    }); 
    
    //clear result
    jq('#clear').click(function(){
        //alert('search');
        jq('#filter').val('');
        jq('#search_result').load('index.php?option=com_popupstatistic&task=search_ocba&filter='+encodeURI(jq('#filter').val())+'&tmpl=component&type='+jq('#ocba_type').val());
    }); 
});
</script>
<?php 

$app = &JFactory::getApplication();
$app->close();

?>
